<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
		<div class="art-layout-cell art-content clearfix">
			<div class="art-block clearfix">
				
				<div class="art-blockcontent">
					Status: <h4>${error}</h4>
					<form action="crudPermission.do" method="post">
						<p>Id: <input name="txtId" value="${entityPermission.id}" readonly="readonly"></p>
						<p>Name: <input name="txtPage" value="${entityPermission.page}" required></p>
						<p>Note: <input name="txtRole" value="${entityPermission.role}" required></p>
						<input type="submit" name="btnCreate" value="Create" class="art-button">
						<input type="submit" name="btnUpdate" value="Update" class="art-button">
						<input type="submit" name="btnDelete" value="Delete" class="art-button">
						<input type="submit" name="btnRefresh" value="Refresh" class="art-button">
					</form>
					
					<h1>DANH SÁCH PERMISSION</h1>
					
					<table class="art-article" width="80%">
						<tbody>
							<tr style="background-color: #42BEEB">
								<th>Id</th>
								<th>Page</th>
								<th>Roles</th>
								<th>&nbsp;</th>
							</tr>
							
							<c:forEach var="c" items="${showPermission}">
								<tr>
									<td>${c.id}</td>
									<td>${c.page}</td>
									<td>${c.role}</td>
									
									<td><a href="crudPermission.do?permissionId=${c.id}">Chi tiết</a></td>
								</tr>
							</c:forEach>
														
						</tbody>
					</table>
				</div>
			</div>
			
		</div>
</body>
</html>